Page({
    data: {
        height: 0
    },
    onLoad: function(options) {
        if (options.order) {
            this.logistics(JSON.parse(options.order));
        }
    },
    // 查询订单快递信息
    logistics(order) {
        wx.doodoo.fetch(`/shop/public/public/delivery`, {
            method: 'GET',
            data: {
                code: order.kuaidi.delivery_code,
                num: order.kuaidi.tracking_number 
            }
        }).then(res => {
            if (res && res.data.errmsg=='ok') {
                this.setData({
                    order_info: order,
                    logistics_info: res.data.data
                });
            }
        })
    }
});
